<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>recognition-of-the-obvious: Исходный файл X:/plugins/ro/image.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Создано системой Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Поиск');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Титульная&nbsp;страница</span></a></li>
      <li><a href="annotated.html"><span>Классы</span></a></li>
      <li class="current"><a href="files.html"><span>Файлы</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Поиск" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Файлы</span></a></li>
      <li><a href="globals.html"><span>Список&nbsp;членов&nbsp;всех&nbsp;файлов</span></a></li>
    </ul>
  </div>
<h1>X:/plugins/ro/image.h</h1><a href="image_8h.html">См. документацию.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef RTIMAGE_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define RTIMAGE_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00005"></a><a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">00005</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>;
<a name="l00007"></a><a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">00007</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a>;
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 
<a name="l00011"></a>00011 
<a name="l00016"></a><a class="code" href="classroImage.html">00016</a> <span class="keyword">class </span><a class="code" href="classroImage.html" title="roImage класс.">roImage</a>
<a name="l00017"></a>00017 {
<a name="l00018"></a>00018 <span class="keyword">private</span>:
<a name="l00019"></a>00019         <a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* m_data;
<a name="l00020"></a>00020         <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> m_width;
<a name="l00021"></a>00021         <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> m_height;
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="keyword">public</span>:
<a name="l00025"></a>00025 
<a name="l00028"></a>00028         <a class="code" href="classroImage.html#a05cd2bb05350332ece7702661e989ce3" title="Конструктор.">roImage</a>();
<a name="l00030"></a>00030 
<a name="l00033"></a>00033         <a class="code" href="classroImage.html#a05cd2bb05350332ece7702661e989ce3" title="Конструктор.">roImage</a>(
<a name="l00034"></a>00034                 <a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* <a class="code" href="classroImage.html#a9044a73f472c27a366637a339a13ab80">data</a>,    
<a name="l00035"></a>00035                 <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="classroImage.html#a02989077f8bd6d2b87968d7718fea1e2">width</a>,             
<a name="l00036"></a>00036                 <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="classroImage.html#a88369922eb1db802fb58bd83fc49e836">height</a>             
<a name="l00037"></a>00037                 );
<a name="l00038"></a>00038         
<a name="l00039"></a>00039         <span class="keywordtype">bool</span> <a class="code" href="classroImage.html#a9f5f401f406becb77bdef49f37ec4b4b">replace</a>(<a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* data, <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> width, <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> height);
<a name="l00040"></a>00040         
<a name="l00041"></a>00041         <a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* <a class="code" href="classroImage.html#a9044a73f472c27a366637a339a13ab80">data</a>();
<a name="l00042"></a>00042         <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="classroImage.html#a02989077f8bd6d2b87968d7718fea1e2">width</a>();
<a name="l00043"></a>00043         <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="classroImage.html#a88369922eb1db802fb58bd83fc49e836">height</a>();
<a name="l00044"></a>00044 
<a name="l00045"></a>00045         <a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* <a class="code" href="classroImage.html#a8b88d370c7ea624e59305f329b132a04">pixel</a>(<a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> x, <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> y);
<a name="l00046"></a>00046         
<a name="l00047"></a>00047 };
<a name="l00048"></a>00048 
<a name="l00049"></a><a class="code" href="classroImage.html#a05cd2bb05350332ece7702661e989ce3">00049</a> <a class="code" href="classroImage.html#a05cd2bb05350332ece7702661e989ce3" title="Конструктор.">roImage::roImage</a>()
<a name="l00050"></a>00050 {
<a name="l00051"></a>00051         m_data = 0;
<a name="l00052"></a>00052         m_width = 0;
<a name="l00053"></a>00053         m_height = 0;
<a name="l00054"></a>00054 }
<a name="l00055"></a>00055 
<a name="l00056"></a><a class="code" href="classroImage.html#ab9f120b1468a58afac2b7990ad2f7db3">00056</a> <a class="code" href="classroImage.html#a05cd2bb05350332ece7702661e989ce3" title="Конструктор.">roImage::roImage</a>(<a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* data, <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> width, <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> height)
<a name="l00057"></a>00057 {
<a name="l00058"></a>00058         <a class="code" href="classroImage.html#a9f5f401f406becb77bdef49f37ec4b4b">replace</a>(data, width, height);
<a name="l00059"></a>00059 }
<a name="l00060"></a>00060 
<a name="l00061"></a><a class="code" href="classroImage.html#a9f5f401f406becb77bdef49f37ec4b4b">00061</a> <span class="keywordtype">bool</span> <a class="code" href="classroImage.html#a9f5f401f406becb77bdef49f37ec4b4b">roImage::replace</a>(<a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* data, <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> width, <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> height)
<a name="l00062"></a>00062 {
<a name="l00063"></a>00063         <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> i, size;
<a name="l00064"></a>00064         <span class="keywordflow">if</span>(data)
<a name="l00065"></a>00065         {
<a name="l00066"></a>00066                 size = width * height * 3;
<a name="l00067"></a>00067                 m_data = <span class="keyword">new</span> <a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>[size];
<a name="l00068"></a>00068                 m_width = width;
<a name="l00069"></a>00069                 m_height = height;
<a name="l00070"></a>00070 
<a name="l00071"></a>00071                 <span class="keywordflow">for</span> (i = 0; i &lt; size; ++ i)
<a name="l00072"></a>00072                                 m_data[i] = data[i];
<a name="l00073"></a>00073         }
<a name="l00074"></a>00074         <span class="keywordflow">else</span>
<a name="l00075"></a>00075                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00076"></a>00076         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00077"></a>00077 }
<a name="l00078"></a>00078 
<a name="l00079"></a><a class="code" href="classroImage.html#a9044a73f472c27a366637a339a13ab80">00079</a> <a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a> * <a class="code" href="classroImage.html#a9044a73f472c27a366637a339a13ab80">roImage::data</a>()
<a name="l00080"></a>00080 {
<a name="l00081"></a>00081         <span class="keywordflow">return</span> m_data;
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083 
<a name="l00084"></a><a class="code" href="classroImage.html#a02989077f8bd6d2b87968d7718fea1e2">00084</a> <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="classroImage.html#a02989077f8bd6d2b87968d7718fea1e2">roImage::width</a>()
<a name="l00085"></a>00085 {
<a name="l00086"></a>00086         <span class="keywordflow">return</span> m_width;
<a name="l00087"></a>00087 }
<a name="l00088"></a>00088 
<a name="l00089"></a><a class="code" href="classroImage.html#a88369922eb1db802fb58bd83fc49e836">00089</a> <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="classroImage.html#a88369922eb1db802fb58bd83fc49e836">roImage::height</a>()
<a name="l00090"></a>00090 {
<a name="l00091"></a>00091         <span class="keywordflow">return</span> m_height;
<a name="l00092"></a>00092 }
<a name="l00093"></a>00093 
<a name="l00094"></a><a class="code" href="classroImage.html#a8b88d370c7ea624e59305f329b132a04">00094</a> <a class="code" href="image_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* <a class="code" href="classroImage.html#a8b88d370c7ea624e59305f329b132a04">roImage::pixel</a>(<a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> x, <a class="code" href="image_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> y)
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096         <span class="keywordflow">return</span> m_data + (y * m_width + x) * 3;
<a name="l00097"></a>00097 }
<a name="l00098"></a>00098 <span class="preprocessor">#endif</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>Указатель</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Классы</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Файлы</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Функции</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Определения типов</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


<hr class="footer"/><address style="text-align: right;">
<small>Документация по <b>recognition-of-the-obvious</b> версии 0.1.21. Последние изменения: Wed Apr 21 20:08:04 2010.</small>
</body> 
</html> 
